package vip.meeet.gc;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class ThreadTestWaitTo extends Thread {
    Object lock = null;

    public ThreadTestWaitTo(Object lock_) {
        lock = lock_;
        this.setName(this.getClass().getName());
    }

    public void run() {
        fun();
    }

    public void fun() {
        synchronized (lock) {
            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
            try {
                reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            fun_longtime();
        }
    }

    public void fun_longtime() {
        try {
            Thread.sleep(60000);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
